"""
_*_ : utf-8 _*_ 
@Time: 2023/11/18 21:07
@Author: LWK
@File: 083_requests
@Project: demo01
"""
import requests

url = 'https://www.baidu.com/s?'

headers = {
    'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) '
                  'Chrome/118.0.0.0 Safari/537.36 Edg/118.0.2088.76'
}

data = {
    'wd': '北京'
}

res = requests.get(url=url, params=data, headers=headers)

res.encoding = 'utf-8'

print(res.text)